Optimal. Leaf size=267 \[ \frac {b e n x^r \left (a+b \log \left (c x^n\right )\right )}{d^3 r^2 \left (d+e x^r\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 d r \left (d+e x^r\right )^2}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d^2 r \left (d+e x^r\right )}+\frac {3 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d^3 r^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {d x^{-r}}{e}\right )}{d^3 r}-\frac {b^2 n^2 \log \left (d+e x^r\right )}{d^3 r^3}-\frac {3 b^2 n^2 \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d^3 r^3}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d^3 r^2}+\frac {2 b^2 n^2 \text {Li}_3\left (-\frac {d x^{-r}}{e}\right )}{d^3 r^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.61, antiderivative size = 267, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 8, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {2391, 2379,
2421, 6724, 2376, 2438, 2373, 266} \begin {gather*} \frac {2 b n \text {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^3 r^2}-\frac {3 b^2 n^2 \text {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right )}{d^3 r^3}+\frac {2 b^2 n^2 \text {PolyLog}\left (3,-\frac {d x^{-r}}{e}\right )}{d^3 r^3}+\frac {3 b n \log \left (\frac {d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^3 r^2}+\frac {b e n x^r \left (a+b \log \left (c x^n\right )\right )}{d^3 r^2 \left (d+e x^r\right )}-\frac {\log \left (\frac {d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d^3 r}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d^2 r \left (d+e x^r\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 d r \left (d+e x^r\right )^2}-\frac {b^2 n^2 \log \left (d+e x^r\right )}{d^3 r^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 2373
Rule 2376
Rule 2379
Rule 2391
Rule 2421
Rule 2438
Rule 6724
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )^3} \, dx &=\frac {\int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )^2} \, dx}{d}-\frac {e \int \frac {x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^r\right )^3} \, dx}{d}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 d r \left (d+e x^r\right )^2}+\frac {\int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx}{d^2}-\frac {e \int \frac {x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^r\right )^2} \, dx}{d^2}-\frac {(b n) \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )^2} \, dx}{d r}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 d r \left (d+e x^r\right )^2}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d^2 r \left (d+e x^r\right )}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {d x^{-r}}{e}\right )}{d^3 r}+\frac {(2 b n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{x} \, dx}{d^3 r}-\frac {(b n) \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )} \, dx}{d^2 r}-\frac {(2 b n) \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )} \, dx}{d^2 r}+\frac {(b e n) \int \frac {x^{-1+r} \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^r\right )^2} \, dx}{d^2 r}\\ &=\frac {b e n x^r \left (a+b \log \left (c x^n\right )\right )}{d^3 r^2 \left (d+e x^r\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 d r \left (d+e x^r\right )^2}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d^2 r \left (d+e x^r\right )}+\frac {3 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d^3 r^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {d x^{-r}}{e}\right )}{d^3 r}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d^3 r^2}-\frac {\left (b^2 n^2\right ) \int \frac {\log \left (1+\frac {d x^{-r}}{e}\right )}{x} \, dx}{d^3 r^2}-\frac {\left (2 b^2 n^2\right ) \int \frac {\log \left (1+\frac {d x^{-r}}{e}\right )}{x} \, dx}{d^3 r^2}-\frac {\left (2 b^2 n^2\right ) \int \frac {\text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{x} \, dx}{d^3 r^2}-\frac {\left (b^2 e n^2\right ) \int \frac {x^{-1+r}}{d+e x^r} \, dx}{d^3 r^2}\\ &=\frac {b e n x^r \left (a+b \log \left (c x^n\right )\right )}{d^3 r^2 \left (d+e x^r\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 d r \left (d+e x^r\right )^2}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d^2 r \left (d+e x^r\right )}+\frac {3 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d^3 r^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {d x^{-r}}{e}\right )}{d^3 r}-\frac {b^2 n^2 \log \left (d+e x^r\right )}{d^3 r^3}-\frac {3 b^2 n^2 \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d^3 r^3}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d^3 r^2}+\frac {2 b^2 n^2 \text {Li}_3\left (-\frac {d x^{-r}}{e}\right )}{d^3 r^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.36, size = 459, normalized size = 1.72 \begin {gather*} \frac {\frac {d^2 r^2 \left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^r\right )^2}+\frac {2 d r \left (a+b \log \left (c x^n\right )\right ) \left (-b n+a r+b r \log \left (c x^n\right )\right )}{d+e x^r}-2 b^2 n^2 \log \left (d-d x^r\right )+6 a b n r \log \left (d-d x^r\right )-2 a^2 r^2 \log \left (d-d x^r\right )+4 a b r^2 \left (n \log (x)-\log \left (c x^n\right )\right ) \log \left (d-d x^r\right )+6 b^2 n r \left (-n \log (x)+\log \left (c x^n\right )\right ) \log \left (d-d x^r\right )-2 b^2 r^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2 \log \left (d-d x^r\right )-6 b^2 n^2 \left (\frac {1}{2} r^2 \log ^2(x)+\left (-r \log (x)+\log \left (-\frac {e x^r}{d}\right )\right ) \log \left (d+e x^r\right )+\text {Li}_2\left (1+\frac {e x^r}{d}\right )\right )+4 a b n r \left (\frac {1}{2} r^2 \log ^2(x)+\left (-r \log (x)+\log \left (-\frac {e x^r}{d}\right )\right ) \log \left (d+e x^r\right )+\text {Li}_2\left (1+\frac {e x^r}{d}\right )\right )+4 b^2 n r \left (-n \log (x)+\log \left (c x^n\right )\right ) \left (\frac {1}{2} r^2 \log ^2(x)+\left (-r \log (x)+\log \left (-\frac {e x^r}{d}\right )\right ) \log \left (d+e x^r\right )+\text {Li}_2\left (1+\frac {e x^r}{d}\right )\right )-2 b^2 n^2 \left (r^2 \log ^2(x) \log \left (1+\frac {d x^{-r}}{e}\right )-2 r \log (x) \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )-2 \text {Li}_3\left (-\frac {d x^{-r}}{e}\right )\right )}{2 d^3 r^3} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \ln \left (c \,x^{n}\right )\right )^{2}}{x \left (d +e \,x^{r}\right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1162 vs.
\(2 (263) = 526\).
time = 0.39, size = 1162, normalized size = 4.35 \begin {gather*} \frac {2 \, b^{2} d^{2} n^{2} r^{3} \log \left (x\right )^{3} + 9 \, b^{2} d^{2} r^{2} \log \left (c\right )^{2} - 6 \, a b d^{2} n r + 9 \, a^{2} d^{2} r^{2} + 6 \, {\left (b^{2} d^{2} n r^{3} \log \left (c\right ) + a b d^{2} n r^{3}\right )} \log \left (x\right )^{2} + {\left (2 \, b^{2} n^{2} r^{3} e^{2} \log \left (x\right )^{3} + 3 \, {\left (2 \, b^{2} n r^{3} e^{2} \log \left (c\right ) - {\left (3 \, b^{2} n^{2} r^{2} - 2 \, a b n r^{3}\right )} e^{2}\right )} \log \left (x\right )^{2} + 6 \, {\left (b^{2} r^{3} e^{2} \log \left (c\right )^{2} - {\left (3 \, b^{2} n r^{2} - 2 \, a b r^{3}\right )} e^{2} \log \left (c\right ) + {\left (b^{2} n^{2} r - 3 \, a b n r^{2} + a^{2} r^{3}\right )} e^{2}\right )} \log \left (x\right )\right )} x^{2 \, r} + 2 \, {\left (2 \, b^{2} d n^{2} r^{3} e \log \left (x\right )^{3} + 3 \, b^{2} d r^{2} e \log \left (c\right )^{2} - 3 \, {\left (b^{2} d n r - 2 \, a b d r^{2}\right )} e \log \left (c\right ) + 6 \, {\left (b^{2} d n r^{3} e \log \left (c\right ) - {\left (b^{2} d n^{2} r^{2} - a b d n r^{3}\right )} e\right )} \log \left (x\right )^{2} - 3 \, {\left (a b d n r - a^{2} d r^{2}\right )} e + 3 \, {\left (2 \, b^{2} d r^{3} e \log \left (c\right )^{2} - 4 \, {\left (b^{2} d n r^{2} - a b d r^{3}\right )} e \log \left (c\right ) + {\left (b^{2} d n^{2} r - 4 \, a b d n r^{2} + 2 \, a^{2} d r^{3}\right )} e\right )} \log \left (x\right )\right )} x^{r} - 6 \, {\left (2 \, b^{2} d^{2} n^{2} r \log \left (x\right ) + 2 \, b^{2} d^{2} n r \log \left (c\right ) - 3 \, b^{2} d^{2} n^{2} + 2 \, a b d^{2} n r + {\left (2 \, b^{2} n^{2} r e^{2} \log \left (x\right ) + 2 \, b^{2} n r e^{2} \log \left (c\right ) - {\left (3 \, b^{2} n^{2} - 2 \, a b n r\right )} e^{2}\right )} x^{2 \, r} + 2 \, {\left (2 \, b^{2} d n^{2} r e \log \left (x\right ) + 2 \, b^{2} d n r e \log \left (c\right ) - {\left (3 \, b^{2} d n^{2} - 2 \, a b d n r\right )} e\right )} x^{r}\right )} {\rm Li}_2\left (-\frac {x^{r} e + d}{d} + 1\right ) - 6 \, {\left (b^{2} d^{2} r^{2} \log \left (c\right )^{2} + b^{2} d^{2} n^{2} - 3 \, a b d^{2} n r + a^{2} d^{2} r^{2} + {\left (b^{2} r^{2} e^{2} \log \left (c\right )^{2} - {\left (3 \, b^{2} n r - 2 \, a b r^{2}\right )} e^{2} \log \left (c\right ) + {\left (b^{2} n^{2} - 3 \, a b n r + a^{2} r^{2}\right )} e^{2}\right )} x^{2 \, r} + 2 \, {\left (b^{2} d r^{2} e \log \left (c\right )^{2} - {\left (3 \, b^{2} d n r - 2 \, a b d r^{2}\right )} e \log \left (c\right ) + {\left (b^{2} d n^{2} - 3 \, a b d n r + a^{2} d r^{2}\right )} e\right )} x^{r} - {\left (3 \, b^{2} d^{2} n r - 2 \, a b d^{2} r^{2}\right )} \log \left (c\right )\right )} \log \left (x^{r} e + d\right ) - 6 \, {\left (b^{2} d^{2} n r - 3 \, a b d^{2} r^{2}\right )} \log \left (c\right ) + 6 \, {\left (b^{2} d^{2} r^{3} \log \left (c\right )^{2} + 2 \, a b d^{2} r^{3} \log \left (c\right ) + a^{2} d^{2} r^{3}\right )} \log \left (x\right ) - 6 \, {\left (b^{2} d^{2} n^{2} r^{2} \log \left (x\right )^{2} + {\left (b^{2} n^{2} r^{2} e^{2} \log \left (x\right )^{2} + {\left (2 \, b^{2} n r^{2} e^{2} \log \left (c\right ) - {\left (3 \, b^{2} n^{2} r - 2 \, a b n r^{2}\right )} e^{2}\right )} \log \left (x\right )\right )} x^{2 \, r} + 2 \, {\left (b^{2} d n^{2} r^{2} e \log \left (x\right )^{2} + {\left (2 \, b^{2} d n r^{2} e \log \left (c\right ) - {\left (3 \, b^{2} d n^{2} r - 2 \, a b d n r^{2}\right )} e\right )} \log \left (x\right )\right )} x^{r} + {\left (2 \, b^{2} d^{2} n r^{2} \log \left (c\right ) - 3 \, b^{2} d^{2} n^{2} r + 2 \, a b d^{2} n r^{2}\right )} \log \left (x\right )\right )} \log \left (\frac {x^{r} e + d}{d}\right ) + 12 \, {\left (2 \, b^{2} d n^{2} x^{r} e + b^{2} d^{2} n^{2} + b^{2} n^{2} x^{2 \, r} e^{2}\right )} {\rm polylog}\left (3, -\frac {x^{r} e}{d}\right )}{6 \, {\left (2 \, d^{4} r^{3} x^{r} e + d^{5} r^{3} + d^{3} r^{3} x^{2 \, r} e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x\,{\left (d+e\,x^r\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________